<?php
/**
 * EMLYON payment Form
 * 
 *  @author Redouane
 *  @since 21/04/2011
 */
class NewsletterAddForm extends NewsletterForm{
	
	public function configure(){
		$this->useFields(array('email'));
		/* Labels */
		$this->widgetSchema->setLabels(array(
	      'email'  => 'Recevoir nos bons plans',
	    ));
		/* Validators */
    	$this->validatorSchema['email']    = new sfValidatorEmail(array('required' => true));   
    	
    	/* Schema */
		$this->validatorSchema['email']->setMessage('required', 'Veuillez renseigner l\'Email');
		$this->validatorSchema['email']->setMessage('invalid', 'Email invalide');
    	
	    $this->widgetSchema->setNameFormat('newsletter[%s]');
		$this->widgetSchema->setFormFormatterName('div');
		$this->widgetSchema->getFormFormatter()->setTranslationCatalogue('front');
    	
	}
	
	
}